import './assets/main.css'

import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import Antd from 'ant-design-vue';
import 'ant-design-vue/dist/reset.css';
import { createPinia } from "pinia";
// import { createProxyMiddleware } from'http-proxy-middleware'

// import axios from "axios";
// axios.defaults.baseURL = 'https://www.huaicaikeyu.cn/client_api'
// axios.defaults.withCredentials = true; //意思是携带cookie信息,保持session的一致性
// axios.defaults.headers.common['Host'] = 'baijiahao.baidu.com';
// axios.defaults.headers.common['Origin'] = 'https://baijiahao.baidu.com';
// 使用持久化插件
import piniaPluginPersist from 'pinia-plugin-persist'
const store = createPinia()
store.use(piniaPluginPersist)
// use('/activity', createProxyMiddleware({
//   target: 'https://baijiahao.baidu.com', // 目标服务器地址
//   changeOrigin: true, // 是否改变源地址
//   rewrite: (path) => path.replace(/^\/activity/, ''),
//   // pathRewrite: {'^/activity': ''} // 重写请求路径
// }))
createApp(App).use(router).use(store).use(Antd).mount('#app')
